<template>
  <el-dialog :visible.sync="dialogVisible" :title="caseNo+' - 流程图'" width="50%">
      <div class="imageArea">
        <img :src="imgUrl" v-if="processInstanceId">
        <div v-else style="font-size: 30px;color: #999;padding: 30px;">暂未提交立案</div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
  </el-dialog>
</template>

<script>
export default {
  name: "process-img",
  data () {
    return {
        imgUrl:"",
        caseNo:'',
        processInstanceId:'',
        dialogVisible:false,
    };
  },
  methods:{
      initPage(detail){
        this.dialogVisible = true;
        this.caseNo = detail.caseNo;
        this.processInstanceId = detail.processInstanceId
        let dts = Date.now() //给时间戳
        this.imgUrl = process.env.VUE_APP_API + "/api/activiti/traffic/process/image/" + this.processInstanceId +"?dts="+dts
      },
  }

}

</script>
<style lang="scss">
.el-dialog__footer{
    border-top:1px solid #ccc;
}
</style>